package org.jadestudio.dsdown.aop;

import java.util.Date;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class AopProxy {
	
	@Pointcut("execution(public * *.jadestudio.dsdown..*.*(..))")
	public void pointCut(){
		
	}
	
	//@Before("pointCut()")
	//public void beforeMethod() throws Throwable{
		
	//}
	
	@Around("pointCut()")
	public Object aroundMethod(ProceedingJoinPoint pjp) throws Throwable{
		System.out.println(pjp.getTarget().getClass().getName()+"->"+pjp.getSignature().getName());
		Object obj=pjp.proceed();
		System.out.println(obj);
		return obj;
	}
	
	
}
